home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part1 / 4373 < prev    next >
Encoding:
Internet Message Format  |  1996-08-06  |  1.2 KB

  1. Path: nebula.broadvision.com!usenet
  2. From: phorgan@broadvision.com (Patrick Horgan)
  3. Newsgroups: comp.lang.c++,comp.unix.programmer
  4. Subject: Re: c++ static objects and fork
  5. Date: 29 Jan 1996 22:33:41 GMT
  6. Organization: The unconfigured xvnews people
  7. Message-ID: <4eji05$3m3@ns.broadvision.com>
  8. References: <4e8qu5$cmb@news02.comp.pge.com>
  9. Reply-To: phorgan@broadvision.com
  10. NNTP-Posting-Host: star.broadvision.com
  11.  
  12. In article <4e8qu5$cmb@news02.comp.pge.com>, psk3@pge.com (Phillip Knight) writes:
  13.  
  14. >but I also have several static objects within the program.  What happens to 
  15. >these objects after the fork?  There is no exec, so they dont get created anew, 
  16. >at least I guess this is the case...
  17. >    Anyone have this figured out?  BTW, system is HPUX v 9.04.
  18.  
  19. I can't tell you the exact way HPUX does it, but I'll tell you in general the 
  20. way it's done...the forked program gets an exact copy of all the pages containing
  21. static objects, as well as the heap.  So...you have your own copy of the static
  22. object.
  23.  
  24. Patrick
  25.  
  26. -- 
  27. Patrick J. Horgan         Broadvision Inc.
  28. phorgan@broadvision.com   333 Distel Circle          Have horse
  29. Phone : (415)943-3677     Los Altos, CA 94022-1404   will ride.
  30. FAX   : (415)934-3701  Opinions mine, not my employers except by coincidence.
  31.  
  32.  
  33.